package com.itheima.pojo;

import com.itheima.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;
@Data
public class Book {
    private Integer id;//主键ID
    @NotEmpty
    private String name;//图书名称
    @NotEmpty
    private String author;//图书作者
    @NotEmpty
    @URL
    private String coverImg;//封面图像
    @NotNull
    private Integer categoryId;//文章分类id
    @NotEmpty
    private String introduction;//图书介绍
    @NotNull
    Integer bookshelfId;  //所属书架
    private Integer createUser;//创建人ID
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
}
